Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop catching generic Exception in triggerer #98

Merged
merged 10 commits into from
Nov 28, 2024

Conversation

tatiana
Copy link
Collaborator

@tatiana tatiana commented Nov 28, 2024

By catching Exception, we risk hitting an unexpected exception that the program can't recover from, or worse, swallowing an important exception without properly logging it - a massive headache when trying to debug programs that are failing in weird ways.

If this change leads to any exceptions that should be caught being raised, we'll have the opportunity to understand which are those exceptions and capture them, handling them in a graceful way.

This was identified during #81 development.

tests/test_triggers.py Outdated Show resolved Hide resolved
tests/test_triggers.py Outdated Show resolved Hide resolved
tests/test_triggers.py Outdated Show resolved Hide resolved
tests/test_triggers.py Outdated Show resolved Hide resolved
tests/test_triggers.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@pankajastro pankajastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just have a minor question otherwise looking good

ray_provider/constants.py Outdated Show resolved Hide resolved
ray_provider/triggers.py Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.74%. Comparing base (b200897) to head (866cbc9).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
- Coverage   98.22%   97.74%   -0.49%     
==========================================
  Files           5        6       +1     
  Lines         564      576      +12     
==========================================
+ Hits          554      563       +9     
- Misses         10       13       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

By catching `Exception`, we run into the ristk of hitting an unexpected exception that the program can't recover from, or worse, swallowing an important exception without properly logging it - a huge headache when trying to debug programs that are failing in weird ways

This was identified during #81 development.
@tatiana tatiana merged commit 6e69368 into main Nov 28, 2024
21 checks passed
@tatiana tatiana added this to the Astro Ray Provider 0.3.0 milestone Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants